# -*- coding: utf-8 -*-
from common.config import *
from db.mysql import MysqlClient
from common.helper import Helper
class Arrangement( object ):
    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "卓越守护百万住院医疗保险（高血压患者专款）"
    # 拉取数据
    def pullData(self,data={}):
        for item in Helper.selectData( self.name,self.mysql):
            if item["plan"] == "标准版有社保计划" or item["plan"] == "标准版无社保计划":
                deductible = "10000元/年"
            else:
                deductible = "20000元/年"
            data["name"] = self.name
            data["company"] = "安盛保险"
            data["year"] = item["year"]
            data["generalMedical"] = "100w"
            data["seriousMedical"] = "100w"
            data["plan"] = item["plan"]
            data["expire"] = item["expire"]
            data["payType"] = "年缴"
            data["deductible"] = deductible
            data["price"] = item["price"]
            Helper.mergeTable(self.name, self.mysql, data)
